{% extends "base.html" %}

{% block content %}
<p><a href="{% url 'images:upload' %}" class="btn btn-default">上传图片</a></p>
<div class="row">
    {% if image_list %}
        {% for image in image_list %}
        <div class="col-md-3">
            <a href="{{ image.get_absolute_url }}" class="thumbnail">
                <img src="{{ image.image.url }}" title="{{ image.caption|escape }}">
            </a>
            <div class="caption">
            <h3>{{ image.caption|escape }}</h3>
            </div>
        </div>
        {% endfor %}
    {% else %}
    <div class="col-md-12">暂无图片</div>
    {% endif %}
</div>
{% endblock %}